#ifndef _MATH_DIAMONDSQ_H_
#define _MATH_DIAMONDSQ_H_


namespace num
{
class RAND32;
class	DiamondSq
{
public:
	DiamondSq();
	~DiamondSq();
	void			Init(int	Width = 127, int Height = 127, int	Range = 255,  float	Bump = 0.2f);
	float	GetValue(int x, int y);
	void			SetValue(int x, int y, float v);
	void			UpdateDiamond(int fx, int fy, int tx, int ty);

	int					m_Width, m_Height, m_MaxRange;
	float*		m_PointA;
private:
	RAND32*				m_pRand;
	float				m_Bump;
};
} //namespace num

#endif//_MATH_DIAMONDSQ_H_